package com.ysd.twocrm.utils;

public class UUID {

    //创建uuid
    public static Object createCheckUUID(){

        return java.util.UUID.randomUUID().toString();
    }

//验证uuid
    public static boolean  checkIsUUid(String uuidstr){

        try {
            java.util.UUID.fromString(uuidstr);
        }catch (Exception e){
         return false;
        }
        return true;
    }

    public static void main(String[] args) {
       for(int i=0;i<10;i++){
           System.out.println(createCheckUUID());
       }
    }
}
